<?php $numberFormatter = new sfNumberFormat($sf_user->getCulture());
//sfNumberFormatInfo::getInstance()->setDecimalDigits(2);
//echo sfNumberFormatInfo::getInstance()->getDecimalDigits();
 ?>
<div id="tablecontainer" style="width:100%">
<table id="reportTable" class="reportTable" border="1">
<thead>
<tr>
<?php foreach($columnsConfig as $colName => $config):?>
<th>
<?php echo $config['label']?>
</th>
<?php endforeach;?>
</tr>
</thead>
<tbody>
<?php foreach($data as $row):?>
<tr>
	<?php $class = ''?>
	<?php foreach($row as $columnName => $value):?>
		<?php if(strtolower(substr($value,0,3))=='tot') $class = 'class="row_total"'?>
		<?php $align = $columnsConfig[$columnName]['align'];?>		
		<td <?php echo $class?> style="text-align: <?php echo $align?>"><?php 
				if($columnsConfig[$columnName]['t_function']!=''){
					if($columnsConfig[$columnName]['format']=='' )
					{
						echo $value;
					}else{
						echo $numberFormatter->format($value, $columnsConfig[$columnName]['format']);
					}
					
					
				}else{
					echo $value;
				}?></td>
	<?php endforeach;?>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
